controlling led by pulse width modulation